import { FastApi } from '@/api';
import Subjects from '@/components/subjects';
import React, { useEffect, useState } from 'react';
import './index.less';

export default function Fast() {
  const [subjects, setSubjects] = useState<IHomeDataCon[]>([]);
  useEffect(() => {
    FastApi().then((res) => {
      // console.log(res);
      setSubjects(res.data.records);
    });
  }, []);
  return (
    <div className="fast">
      {subjects.map((item) => (
        <Subjects key={item.id} data={item}></Subjects>
      ))}
    </div>
  );
}
